<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="layout" content="main" />
    <title>产品销售详情</title>
  </head>
  <body>
      <g:hiddenField name="inPrice" value="${inPrice}" />
    <div class="nav">
            <span class="menuButton"><g:link class="list" action="list">库存流水账列表</g:link></span>
            <g:if test="${remain <= 0}">
            </g:if>
            <g:else>
                <span class="menuButton"><g:link class="create" controller="exportProduct" action="sellDetail" id="${params.id}" params="[inPrice:dto.inPrice,outPrice:dto.outPrice,modelNo:dto.modelNo,productName:dto.productName,supplierName:dto.supplierName,catalogName:dto.catalogName,remain:remain]">产品售出</g:link></span>
            </g:else>
    </div>
    <div class="body">
            <h1>销售列表</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>

                   	        <g:sortableColumn property="number" title="进货序号" />
                        
                   	        <g:sortableColumn property="amount" title="数量" />
                        
                   	        <g:sortableColumn property="inPrice" title="进价" />
                        
                   	        <g:sortableColumn property="modelNo" title="型号" />
                        
                   	        <g:sortableColumn property="outPrice" title="零售价" />

                            <g:sortableColumn property="outPrice" title="销售时间" />

                            <g:sortableColumn property="taskStatus" title="货品情况" />

                            <g:sortableColumn property="id" title="查看" />
                        
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${productInstanceList}" status="i" var="productInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                            <td>${fieldValue(bean:productInstance, field:'number')}</td>
                        
                            <td>${fieldValue(bean:productInstance, field:'amount')}</td>
                        
                            <td>${fieldValue(bean:productInstance, field:'inPrice')}</td>
                        
                            <td>${fieldValue(bean:productInstance, field:'modelNo')}</td>
                        
                            <td>${fieldValue(bean:productInstance, field:'outPrice')}</td>

                            <td><g:customDateFormat>${fieldValue(bean:productInstance, field:'time')}</g:customDateFormat></td>

                            <td>${fieldValue(bean:productInstance, field:'productFlag')}</td>

                            <td><g:link controller="exportProduct" action="show" id="${productInstance.id}">查看详情</g:link></td>
                       
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <br>
            <p><font color="#FF0000">该批次货物的库存还剩余:</font>${remain}</p>
    </div>
  </body>
</html>
